<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ProductImages extends Model
{
    protected $table = 'product_images';

    protected $hidden = [
        'created_at', 'updated_at', 'product_id'
    ];
    public function getImageAttribute($value)
    {
        if($value)
        {
            return $this->attributes['image'] = config('upload.ossUrl').$value;
        }else{
            return $this->attributes['image'] = '';
        }
    }
}
